export function blobToBase64string(data: Blob): Promise<string> {
  return new Promise((resolve, reject) => {
    const reader = new FileReader()
    reader.onloadend = () => {
      // reader.result 包含了 base64 编码的数据
      const base64String = reader.result as string
      resolve(base64String) // 移除前缀 "data:application/pdf;base64,"
    }
    reader.onerror = reject
    reader.readAsDataURL(data) // 读取 Blob 作为 Data URL
  })
}
